/**
 * Bakalarska prace - Inteligentni budik
 * @package sleepCatcher
 * @file SCSettings.h
 * @author Jan Pesava - xpesav00
 * @email xpesav00@stud.fit.vutbr.cz
 * @date 24. 12. 2011
 */

#ifndef SCSETTINGS_H_
#define SCSETTINGS_H_

#include <FXml.h>

#include "SCBaseObject.h"

using namespace Osp::Xml;

class SCSettings : public SCBaseObject
{

// Construct
private:
	SCSettings();
	virtual ~SCSettings();
public:
	static result Construct();
	static result Destruct();

// Constants
	static const int LANGUAGE_EN = 0;
	static const int LANGUAGE_CS = 1;
	static const int LANGUAGE_DE = 2;

// Attributes
private:
	static Integer windowSize; //at minute
	static Integer partLength; //at minute
	static Integer awakeTimeDifference; // at minute
	static Integer language;
	static Integer sleepLength; // at minute;
	static Integer compression; //1:compression
	static Integer sleepPeriod; // at minute

// Methods
public:
	static void SetWindowSize(int minute);
	static int GetWindowSize();
	static void SetPartLength(int minute);
	static int GetPartLength();
	static void SetAwakeTimeDifference(int minute);
	static int GetAwakeTimeDifference();
	static void SetLanguage(int value);
	static int GetLanguage();
	static void SetSleepLength(int value);
	static int GetSleepLength();
	static void SetCompression(int value);
	static int GetCompression();
	static void SetSleepPeriod(int value);
	static int GetSleepPeriod();
	static int ConvertMinuteToTicks(int minute);
	static int GetWindowSizeTicks();
	static int GetPartLengthTicks();
	static int GetAwakeTimeDifferenceTicks();
	static int GetSleepPeriodTicks();
	static void SetDefaultValue();
	static result SetAttribute(String namePath[], String value, int depth);
	static String GetLanguageString(int language);
	static result Load();
	static result Save();
};

#endif /* SCSETTINGS_H_ */
